home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
util
/
gnu
/
emacs_src.lha
/
emacs-18.58
/
src
/
dostrip.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-04-26
|
390b
|
24 lines
#include <stdio.h>
#define SIZE 2048
main(int argc, char **argv)
{
char buf[SIZE];
buf[SIZE - 1] = 0;
while (fgets(buf, SIZE - 1, stdin))
{
if (buf[0] != '#')
{
char *p = buf, *e;
while (*p && *p == ' ') p++;
e = p + strlen(p);
while (e > p && (e[-1] == ' ' || e[-1] == '\t' || e[-1] == '\n')) e--;
*e = '\0';
if (*p) puts(p);
}
}
}